import request from '@/router/axios';
import {downloadExcel} from '@/router/axios';
import {formatCondition} from '@/util/util';

//模型任务组管理单条查询
export const queryBizModelTaskGroup = (params) => {
  params.head.transCode = 'queryBizModelTaskGroup';
  return request({
    url: '/biz/model/bizModelTaskGroup/queryBizModelTaskGroup',
    method: 'post',
    data: params
  })
}
//模型任务组管理多条列表查询，支持条件查询
export const queryBizModelTaskGroupListPage = (params) => {
  params.head.transCode = 'queryBizModelTaskGroupListPage';
  return request({
    url: '/biz/model/bizModelTaskGroup/queryBizModelTaskGroupListPage',
    method: 'post',
    data: params
  })
}
//模型任务组管理新增单条记录
export const saveBizModelTaskGroup = (params) => {
  params.head.transCode = 'saveBizModelTaskGroup';
  return request({
    url: '/biz/model/bizModelTaskGroup/saveBizModelTaskGroup',
    method: 'post',
    data: params
  })
}
//模型任务组管理新增多条记录
export const saveBizModelTaskGroupList = (params) => {
  params.head.transCode = 'saveBizModelTaskGroupList';
  return request({
    url: '/biz/model/bizModelTaskGroup/saveBizModelTaskGroupList',
    method: 'post',
    data: params
  })
}
//模型任务组管理新增或修改单条记录
export const saveOrUpdateBizModelTaskGroup = (params) => {
  params.head.transCode = 'saveOrUpdateBizModelTaskGroup';
  return request({
    url: '/biz/model/bizModelTaskGroup/saveOrUpdateBizModelTaskGroup',
    method: 'post',
    data: params
  })
}


//模型任务组管理新增或修改单条记录
export const saveOrUpdateBizModelTaskGroupList = (params) => {
  params.head.transCode = 'saveOrUpdateBizModelTaskGroupList';
  return request({
    url: '/biz/model/bizModelTaskGroup/saveOrUpdateBizModelTaskGroupList',
    method: 'post',
    data: params
  })
}

//模型任务组管理修改单条记录
export const updateBizModelTaskGroup = (params) => {
  params.head.transCode = 'updateBizModelTaskGroup';
  return request({
    url: '/biz/model/bizModelTaskGroup/updateBizModelTaskGroup',
    method: 'post',
    data: params
  })
}

//模型任务组管理删除单条记录
export const deleteBizModelTaskGroup = (params) => {
  params.head.transCode = 'deleteBizModelTaskGroup';
  return request({
    url: '/biz/model/bizModelTaskGroup/deleteBizModelTaskGroup',
    method: 'post',
    data: params
  })
}

//模型任务组管理删除多条记录
export const deleteBizModelTaskGroupList = (params) => {
  params.head.transCode = 'deleteBizModelTaskGroupList';
  return request({
    url: '/biz/model/bizModelTaskGroup/deleteBizModelTaskGroupList',
    method: 'post',
    data: params
  })
}
//模型任务组管理导出excel
export const exportBizModelTaskGroupExcel = (params) => {
  downloadExcel({
    url: '/biz/model/bizModelTaskGroup/excelDownload/exportBizModelTaskGroupExcel',
    method: 'get',
    data: 
    {
      tenantId: params.head.tenantId,
      orders:'',
      condition: formatCondition(params.body.sqlCondition)
    }
  })
}
